package com.programmercarl.string;

/**
 * https://leetcode.cn/problems/reverse-string/description/
 *
 * @author yulongtian
 * @create 2024-12-15 11:03
 */
public class Test01 {
    public static void main(String[] args) {

    }

    public void reverseString(char[] s) {
        int i = 0, j = s.length - 1;
        while (i < j) {
            char temp = s[i];
            s[i] = s[j];
            s[j] = temp;
            i++;
            j--;
        }
    }

}
